#include "StdAfx.h"
#include "MyWindow.h"

CMyWindow::CMyWindow(void)
{
}

CMyWindow::~CMyWindow(void)
{
}

BOOL CMyWindow::Create(LPCTSTR lpszCaption,
					   DWORD dwStyle,
					   const RECT& rect,
					   HWND pParentWnd,
					   UINT nID)
{
	return 0;
}
HWND CMyWindow::GetHandle()
{
	return this->m_Handle;
}
int CMyWindow::GetID()
{
	return this->m_ID;
}
void CMyWindow::SetHandle(HWND handle)
{
	this->m_Handle = handle;
}
void CMyWindow::SetID(int nID)
{
	this->m_ID = nID;
}

LPCTSTR CMyWindow::GetText(void)
{
	TCHAR* text;
	int len = SendMessage(this->GetHandle(),WM_GETTEXTLENGTH, 0, 0); 
	text = new TCHAR[len + 1];
	SendMessage(this->GetHandle(), WM_GETTEXT, len + 1, (LPARAM)text);
	return text;
}

void CMyWindow::SetText(LPCTSTR sText)
{
	SendMessage(this->GetHandle(), WM_SETTEXT, 0, (LPARAM)sText);
}
